

<template>
  <lm-button @click="add">+</lm-button>
  <lm-button @click="onDelete">-</lm-button>
  <lm-scrollbar
    max-height="400px"
    class="scrollbar"
  >
    <p
      v-for="item in count"
      :key="item"
    >{{ item }}</p>
  </lm-scrollbar>
</template>

<script setup lang="ts">
import { ref } from 'vue';
const count = ref(3)
const add = () => {
  count.value++
}
const onDelete = () => {
  if (count.value > 0) {
    count.value--
  }
}
</script>
